<template>
  <div>
    <router-view
      :tagId="tagActive.tagId"
      :tagName="tagActive.tagName"
      @getSonglistId="toSonglistPage"
      @toMusicListDetailPage="toMusicListDetailPage"
    ></router-view>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tagActive: {
        tagId: '',
        tagName: '',
      },
    }
  },

  created() {
    this.keepRouterHighlight()
  },
  methods: {
    // 保持状态栏高亮
    keepRouterHighlight() {
      const active = '3'
      this.$emit('keepRouterHighlight', active)
    },

    // 跳转到精品歌单详情页面
    toMusicListDetailPage(data) {
      this.tagActive.tagId = data.tagActive.tagId
      this.tagActive.tagName = data.tagActive.tagName
      this.$router.push({
        path: data.path,
      })
    },
    toSonglistPage(data) {
      this.$emit('getSonglistId', data)
    },
  },
}
</script>

<style lang="less" scoped>
</style>